home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2005 October / PCWOCT05.iso / Software / FromTheMag / The GIMP 2.2.8 / gimp-2.2.8-i586-setup.exe / {app} / share / gimp / 2.0 / scripts / swirltile.scm < prev    next >
Encoding:
GIMP Script-Fu Script  |  2005-06-30  |  2.2 KB  |  65 lines

  1. ;
  2. ; Swirl-tile
  3. ;  produces a (hope-fully) seamlessly tiling swirling effect
  4. ;
  5. ;  Adrian Likins  <aklikins@eos.ncsu.edu>
  6. ;
  7. ;  http://www4.ncsu.edu/eos/users/a/aklikins/pub/gimp/
  8. ;
  9.  
  10.  
  11. (define (script-fu-swirl-tile depth azimuth elevation blurRadius height width whirl-amount noise-level bg-color)
  12.   (let* ((img (car (gimp-image-new width height RGB)))
  13.      (layer-one (car (gimp-layer-new img width height
  14.                      RGB-IMAGE "TEST" 100 NORMAL-MODE)))
  15.      (cx (/ width 2))
  16.      (cy (/ height 2)))
  17.  
  18.     (gimp-context-push)
  19.  
  20.     (gimp-image-undo-disable img)
  21.  
  22.     (gimp-image-add-layer img layer-one 0)
  23.     (gimp-context-set-background bg-color)
  24.     (gimp-edit-fill layer-one BACKGROUND-FILL)
  25.     (plug-in-noisify 1 img layer-one FALSE noise-level noise-level noise-level 1.0)
  26.  
  27.     (plug-in-whirl-pinch 1 img layer-one whirl-amount 0.0 1.0)
  28.     (plug-in-whirl-pinch 1 img layer-one whirl-amount 0.0 1.0)
  29.     (plug-in-whirl-pinch 1 img layer-one whirl-amount 0.0 1.0)
  30.  
  31.     (gimp-drawable-offset layer-one TRUE 0 cx cy)
  32.  
  33.     (plug-in-whirl-pinch 1 img layer-one whirl-amount 0.0 1.0)
  34.     (plug-in-whirl-pinch 1 img layer-one whirl-amount 0.0 1.0)
  35.     (plug-in-whirl-pinch 1 img layer-one whirl-amount 0.0 1.0)
  36.  
  37.     (plug-in-gauss-rle 1 img layer-one blurRadius TRUE TRUE)
  38.  
  39.     (plug-in-bump-map 1 img layer-one layer-one azimuth elevation depth 0 0 0 0 FALSE FALSE 0)
  40.  
  41.     (gimp-display-new img)
  42.     (gimp-image-undo-enable img)
  43.  
  44.     (gimp-context-pop)))
  45.  
  46. (script-fu-register "script-fu-swirl-tile"
  47.             _"Swirl-_Tile..."
  48.             "Create an interesting swirled tile"
  49.             "Adrian Likins <aklikins@eos.ncsu.edu>"
  50.             "Adrian Likins"
  51.             "1997"
  52.             ""
  53.             SF-ADJUSTMENT _"Depth"            '(10 0 64 1 1 0 0)
  54.             SF-ADJUSTMENT _"Azimuth"          '(135 0 360 1 10 0 0)
  55.             SF-ADJUSTMENT _"Elevation"        '(45 0 90 1 10 0 0)
  56.             SF-ADJUSTMENT _"Blur radius"      '(3 0 128 1 10 0 0)
  57.             SF-ADJUSTMENT _"Height"           '(256 0 1024 1 10 0 1)
  58.             SF-ADJUSTMENT _"Width"            '(256 0 1024 1 10 0 1)
  59.             SF-ADJUSTMENT _"Whirl amount"     '(320 0 360 1 10 0 0)
  60.             SF-ADJUSTMENT _"Roughness"        '(.5 0 1 .1 .01 2 1)
  61.             SF-COLOR      _"Background color" '(255 255 255))
  62.  
  63. (script-fu-menu-register "script-fu-swirl-tile"
  64.              _"<Toolbox>/Xtns/Script-Fu/Patterns")
  65.